Function Remove-ScheduledTask(){
    [CmdletBinding()]param(
		[string]$vdi=$env:COMPUTERNAME,
		[string]$folder="\",
		[string]$task_name,
		[string]$domain="nam",
		[string]$fid="aaadmin",
		[string]$pswd,
		[Microsoft.Win32.TaskScheduler.TaskFolder]$task_folder,
		[boolean]$refresh
	)
	Try{
	    if( ! $PSBoundParameters.ContainsKey('task_folder') ){
			$task_folder = Get-TaskFolder $vdi $domain $fid $pswd $folder $refresh
			if(!$task_folder){ "Not found task folder <$task_folder> in $vdi"}
		}
		$task_folder.DeleteTask($task_name,$false)
	}Catch{
	    throw $_
	}Finally{}
}
